import datetime

ARXIV_API_ENDPOINT = "http://export.arxiv.org/api/query?"
HEADERS = {
    "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) arXivCrawler/1.0",
    "Accept": "application/xml"
}
OUTPUT_JSON_PATH = "arxiv_papers.json"
OUTPUT_JSON_IDS_PATH = "arxiv_ids.json"
# 30 requests/min = 0.5 requests/sec
REQUEST_INTERVAL = datetime.timedelta(seconds=3)
START_DATE = '202501010000'  # 由命令行参数传入，格式为YYYYMMDD
END_DATE = '202601010000'    # 由命令行参数传入
# 使用占位符，实际值由命令行参数传入
CATEGORIES = []  # 由命令行参数传入多个类别
SEARCH_QUERY = f"cat:({' OR '.join(CATEGORIES) if CATEGORIES else '*'})+AND+submittedDate:[{START_DATE}+TO+{END_DATE}]"
MAX_RESULTS = 10000000  # 最大获取论文数量
batch_size = 1000
